package com.example.myproject.client;

public class gridLayout3 extends myGrid{
	
	/*griLayoutx is merely a way to set the patterns for each
	 * configuration.  It will go through, set each cell in a grid to available 
	 * for 'x'.  if it is a plain module, it also adds it to the avaiable queue
	 * since plains need to be set first.
	 */	
	public gridLayout3()
	{
		//set main components
		super();
		
		for( int i = 41; i <= 44; i++)
		{
			layout[i][25].availFor[plain] = true;
			availCells.add(layout[i][25]);
		}
		for( int i = 24; i >= 21; i--)
		{
			layout[44][i].availFor[plain] = true;
			availCells.add(layout[44][i]);
		}
		for( int i = 26; i <= 29; i++)
		{
			layout[44][i].availFor[plain] = true;
			availCells.add(layout[44][i]);
		}
		layout[45][29].availFor[plain] = true;
		availCells.add(layout[45][29]);
		for( int i = 45; i <= 50; i++)
		{
			layout[i][25].availFor[plain] = true;
			availCells.add(layout[i][25]);
		}
		for( int i = 26; i <= 27; i++)
		{
			layout[49][i].availFor[plain] = true;
			availCells.add(layout[49][i]);
		}
		for( int i = 24; i >= 23; i--)
		{
			layout[50][i].availFor[plain] = true;
			availCells.add(layout[50][i]);
		}
		for( int i = 51; i <= 55; i++)
		{
			layout[i][25].availFor[plain] = true;
			availCells.add(layout[i][25]);
		}
		for( int i = 26; i <= 29; i++)
		{
			layout[55][i].availFor[plain] = true;
			availCells.add(layout[55][i]);
		}
		for( int i = 24; i >= 21; i--)
		{
			layout[55][i].availFor[plain] = true;
			availCells.add(layout[55][i]);
		}
		layout[54][21].availFor[plain] = true;
		availCells.add(layout[54][21]);
		for( int i = 56; i <= 58; i++)
		{
			layout[i][25].availFor[plain] = true;
			availCells.add(layout[i][25]);
		}
		
		layout[44][20].availFor[canteen] = true;
		layout[54][20].availFor[food] = true;
		layout[55][20].availFor[canteen] = true;
		
		layout[43][21].availFor[food] = true;
		layout[45][21].availFor[food] = true;
		layout[53][21].availFor[food] = true;
		layout[56][21].availFor[food] = true;
		
		layout[43][22].availFor[dorm] = true;
		layout[45][22].availFor[dorm] = true;
		layout[50][22].availFor[air] = true;
		layout[54][22].availFor[dorm] = true;
		layout[56][22].availFor[dorm] = true;
		
		layout[43][23].availFor[dorm] = true;
		layout[45][23].availFor[dorm] = true;
		layout[49][23].availFor[med] = true;
		layout[51][23].availFor[sanit] = true;
		layout[54][23].availFor[dorm] = true;
		layout[56][23].availFor[dorm] = true;

		layout[41][24].availFor[power] = true;
		layout[42][24].availFor[gym] = true;
		layout[43][24].availFor[sanit] = true;
		layout[45][24].availFor[sanit] = true;
		layout[46][24].availFor[power] = true;
		layout[47][24].availFor[control] = true;
		layout[49][24].availFor[dorm] = true;
		layout[51][24].availFor[dorm] = true;		
		layout[53][24].availFor[gym] = true;
		layout[54][24].availFor[sanit] = true;
		layout[56][24].availFor[sanit] = true;
		layout[57][24].availFor[control] = true;
		layout[58][24].availFor[med] = true;
		
		layout[40][25].availFor[air] = true;
		layout[59][25].availFor[air] = true;		
		
		layout[41][26].availFor[med] = true;
		layout[42][26].availFor[control] = true;
		layout[43][26].availFor[sanit] = true;
		layout[45][26].availFor[sanit] = true;
		layout[46][26].availFor[gym] = true;
		layout[48][26].availFor[dorm] = true;
		layout[50][26].availFor[dorm] = true;
		layout[52][26].availFor[control] = true;		
		layout[53][26].availFor[power] = true;
		layout[54][26].availFor[sanit] = true;
		layout[56][26].availFor[sanit] = true;
		layout[57][26].availFor[gym] = true;
		layout[58][26].availFor[power] = true;
		
		layout[43][27].availFor[dorm] = true;
		layout[45][27].availFor[dorm] = true;
		layout[48][27].availFor[sanit] = true;
		layout[50][27].availFor[med] = true;
		layout[54][27].availFor[dorm] = true;
		layout[56][27].availFor[dorm] = true;
		
		layout[43][28].availFor[dorm] = true;
		layout[45][28].availFor[dorm] = true;
		layout[49][28].availFor[air] = true;
		layout[54][28].availFor[dorm] = true;
		layout[56][28].availFor[dorm] = true;
		
		layout[43][29].availFor[food] = true;
		layout[46][29].availFor[food] = true;
		layout[54][29].availFor[food] = true;
		layout[56][29].availFor[food] = true;		

		layout[44][30].availFor[canteen] = true;
		layout[45][30].availFor[food] = true;
		layout[55][30].availFor[canteen] = true;
		
		//add all non-plain components to avil list
		setAvailCells();
	}

}